from business.tour.tour_resource_checker import Checker
from base.reportcontrol import record
from business.subjectvideo.get_sub_video import GetSubjectVideo
from functools import wraps
from pprint import pprint

"""
待完成:
1、返回数据完整性校验，需要深度绑定
2、道具、道具包id、资源取值为空的校验
仓库地址切换到gitee
"""


def printer(func):
    @wraps(func)
    def _wrapper(*args, **kwargs):
        r = func(*args, **kwargs)
        pprint(r)
        return r

    return _wrapper


def check_tour_run():
    checker = Checker()
    r = checker.do_check()
    record(r)


# 与用户购买商品版本相同的标准教辅、物料、专题信息
@printer
def user_video_topic_detail(mobile):
    r = GetSubjectVideo(mobile=mobile)
    return r.result


check_tour_run()
